% title = 'Register'
% include(top)

<div class="pure-g creds">
	<div class="pure-u-1 center">
		<h1>Register an Account</h1>
	</div>
	<div class="pure-u-1 pure-u-md-1-4 pure-u-lg-1-3"></div>
	<div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
% if success_text:
		<h3 class="success boxed">Hi, {{success_text}}! You are now registered.</h3>
		<p><a href="/user/">Click here</a> if you aren't automatically redirected after 5 seconds.</p>
		<meta http-equiv="refresh" content="3; url=http://paste.hydra.ws/user/">

% else:
		<form action="/register" method="post" class="pure-form pure-form-aligned">

% if error_text: 
			<p class="error boxed"><b>Error:</b> {{error_text}}</p>
% end  # (if)

			<fieldset class="pure-group">
				<input class="pure-input-1" required name="username" type="text" placeholder="Username" autofocus>
				<input class="pure-input-1" name="email" type="text" placeholder="Email (optional)">
			</fieldset>
			<fieldset class="pure-group">
				<input class="pure-input-1" required name="password" type="password" placeholder="Password">
				<input class="pure-input-1" required name="password-confirm" type="password" placeholder="Password (confirm)">
			</fieldset>
			<fieldset class="pure-group">
				<input class="pure-input-1" required name="captcha-challenge" type="text" placeholder="Captcha">
			</fieldset>
			<div class="pure-g">
				<div class="pure-u-1 pure-u-sm-3-8 center"><p>Please complete this CAPTCHA.</p></div>
				<div class="pure-u-1 pure-u-sm-5-8 center">{{!captcha_data}}</div>
			</div>
			<fieldset class="pure-group">
				<button type="submit" class="pure-button pure-input-1 pure-button-primary">Register</button>
			</fieldset>
		</form>
% end  # (if)

	</div>
	<div class="pure-u-1 pure-u-md-1-4 pure-u-lg-1-3"></div>
</div>

% include(bottom)
